#ifdef _WIN32
#ifndef STRAY_GRAPHICS_VIEW_DX9_H
#define STRAY_GRAPHICS_VIEW_DX9_H

#include <d3d9.h>

#include "../../Common.h"
#include "../../SmartPtr/IntrusivePtr.h"
#include "../View.h"
#include "LostResource\LostResource.h"

namespace Stray {
namespace Core {
namespace Graphics {
namespace DirectX9 {

class DeviceDX9;

class ViewDX9 : public Stray::Core::Graphics::View, public LostResource
{
	friend class GraphicsSetFactoryDX9;
private:
	ViewDX9(IDirect3DSwapChain9 *pSwapChain, DeviceDX9 *pDevice);
public:
	~ViewDX9();

	void releaseResource();
	void recoverResource();

	Stray::Point2D getBackBufferSize();
	void present();
private:
	IDirect3DSwapChain9 *pSwapChain_;
};

typedef Stray::IntrusivePtr<ViewDX9>::type ViewDX9Ptr;

}
}
}
}

#endif
#endif